/*
From Wood & Hoy (2020) “Helping us or helping them? What makes foreign aid 
popular with donor publics?”, Economic Development and Cultural Change

Table 2 -- views on aid volume by party
*/

//create a variable that condenses responses to question three into "too much", 
//"about right" and "too little"
gen Q3_condense =.
replace Q3_condense = 1 if Q3==1|Q3==2
replace Q3_condense = 2 if Q3==3
replace Q3_condense = 3 if Q3==4|Q3==5
replace Q3_condense = 4 if Q3==6
label var Q3_condense "The Australian government gives..."

label define Q3c_lab 1 "Too much aid" 2 "About right" 3 "Too little aid" ///
4 "Don't know", replace

label values Q3_condense Q3c_lab

//create a variable that simplifies parties into left, right and other
gen pol_simp =.
replace pol_simp= 1 if DV==1|DV==4
replace pol_simp = 2 if DV==2|DV==3
replace pol_simp = 3 if DV==96|DV==97|DV==98
label define pol_simp_lab 1 "Left" 2 "Right" ///
3 "Other", replace
label values pol_simp pol_simp_lab

//create table using control group
qui tabout Q3_condense pol_simp using Table_2_up_down_control.xls if HQGROUP==5, ///
cells(col) format(0p) layout(col) replace ptotal(none)

//drop created variables
drop Q3_condense
label drop Q3c_lab
drop pol_simp 
label drop pol_simp_lab
